import { useStore } from '../store'

export default () => {
  const { config } = useStore()

  // 设置壁纸保存目录
  const setImageDirectory = async () => {
    const path = await window.api.setImageDirectory()
    console.log(path)
    if (path) {
      console.log(path)
      console.log(config)
      config.saveDirectory = path
    }
  }

  return {
    setImageDirectory
  }
}
